* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@font-face {
  font-family: "words";
  src: url("../fonts/造字工房言宋体.otf");
}

@keyframes flash {
  0% {
    filter: blur(10px);
    transform: scale(0.5);
    background-color: black;
  }
  50% {
    filter: blur(10px);
    transform: scale(0.6);
    background-color: white;
  }
  100% {
    //width: 0;
    //height: 0;
    filter: blur(10px);
    transform: scale(0.5);
    background-color: black;
  }
}

@imgW: 1059px;
@imgH: 750px;
body {
  background: black;
  transition: background-color 1s;
  @mainW: 1457px;
  @mainH: 792px;
  position: relative;
  overflow: hidden;

  .lock {
    width: 600px;
    height: 300px;
    z-index: 10000;
    position: absolute;
    left: 35px;
    top: 33px;
    @digW: 65px;
    @digH: 119px;
    @digM: 15px;
    transform-origin: left top;
    transform: scale(0.5);
    transition: all 1s;

    .dig {
      position: absolute;
      width: @digW;
      height: @digH;
      //outline: solid 1px green;

      img.bar {
        position: absolute;
        width: 10px;
        transition: all 1s;
        box-shadow: rgba(0, 0, 0, 0.6) 2px 2px 3px;
      }

      .b1 {
        left: 27px;
        top: -21px;
        transform: rotate(90deg);
      }

      .b2 {
        left: 27px;
        top: 33px;
        transform: rotate(90deg);
      }

      .b3 {
        left: 27px;
        top: 86px;
        transform: rotate(90deg);

      }

      .b4 {
        left: 0;
        top: 6px;
      }

      .b5 {
        top: 6px;
        left: 54px;
      }

      .b6 {
        top: 60px;
      }

      .b7 {
        top: 60px;
        left: 54px;
      }

      @blockLen: 15px;

      .digBlock {
        width: @blockLen;
        height: @blockLen;
        background-color: white;
        box-shadow: 2px 2px 2px gray;
        //margin: 0 auto;
        position: absolute;
        left: @digW*0.5;
        margin-left: -(@blockLen*0.5);
        top: @digH*0.5;
        margin-top: -(@blockLen*0.5);
      }

      @dy: 20px;

      .blk1 {
        transform: translateY(-@dy);
      }

      .blk2 {
        transform: translateY(@dy);
      }

    }

    .dig1 {
      left: (@digW+@digM)*0;
    }

    .dig2 {
      left: (@digW+@digM)*1;
    }

    .dig3 {
      left: (@digW+@digM)*2;
    }

    .dig4 {
      left: (@digW+@digM)*3;
    }

    .dig5 {
      left: (@digW+@digM)*4;
    }
  }

  .roundMask {
    width: @mainW;
    //width: 100%;
    height: @mainH;
    margin: 0 auto;
    position: absolute;
    z-index: 9000;
    left: 0;
    opacity: 1;
    transition: all 1s;

    img {
      width: 100%;
      height: 100%;
    }
  }

  .touch {
    position: absolute;
    left: 0;
    width: 80%;
    height: 100vh;
    z-index: 11000;
  }

  .endTitle {
    z-index: 6000;
    font-family: "words", serif;
    font-size: 100px;
    text-align: center;
    margin-top: 350px;
    position: absolute;
    width: 100%;
    left: 0;
    top: 0;
    opacity: 0;
    transition: all 1s;
  }

  .doc {
    position: absolute;
    width: 0;
    height: 0;
    //width: 100%;
    //height: 100vh;
    z-index: 9500;

    .words {
      position: absolute;
      color: white;
      //outline: solid 1px;
      width: 400px;
      height: 200px;
      font-size: 30px;
      user-select: none;
      font-family: "words", serif;
      line-height: 2em;

      left: 0;
      top: 0;
      transition: all 1.2s;
    }
  }

  .control {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 9500;
    height: 100vh;
    width: 300px;
    transition: all 1s;
    user-select: none;

    .led {
      position: absolute;
      @L: 8px;
      width: @L;
      height: @L;
      border-radius: 50%;
      top: 165px;
      left: 121px;
      z-index: 5000;
      transition: all 0.5s;
    }

    .opening {
      background-color: deepskyblue;
      box-shadow: deepskyblue 0 0 20px, deepskyblue 0 0 5px;
    }

    .shutDown {
      background-color: #333;
    }

    img {
      position: absolute;
    }

    img.night {
      left: 98px;
      top: 239px;
    }

    @left1: 41px;
    @left2: 151px;
    @top0: 140px;
    @top1: 332px;
    @top2: 437px;

    .pbOn {
      left: @left1;
      top: @top0;
      background-color: deepskyblue;
    }

    .pbOff {
      top: @top0;
      left: @left2;
    }

    .pb1 {
      left: @left1;
      top: @top1;

    }

    .pb2 {
      left: @left2;
      top: @top1;
    }

    .pb3 {
      left: @left1;
      top: @top2;
    }

    .pb4 {
      left: @left2;
      top: @top2;
    }

    .pannelBtnFunc() {
      border-width: 4px;
      border-color: black;
      border-style: solid;
      z-index: 2000;
      padding: 10px;
      box-shadow: 3px 3px 10px #232323, 0 0 5px #222 inset;
      transition: all 0.1s;
      filter: brightness(75%);

      &:hover {
        cursor: pointer;
        filter: brightness(100%);
        box-shadow: 3px 3px 10px black, 0 0 5px black inset;
      }

      &:active {
        filter: brightness(90%);
        transform: scale(0.9);
        box-shadow: 0 0 10px #333 inset;
      }
    }

    .lightBtn {
      position: absolute;
      .pannelBtnFunc();
      padding: 5px;
      width: 200px;
      height: 60px;
      left: 31px;
      top: 559px;
      border-radius: 1000px;
      // font
      font-size: 40px;
      color: white;
      line-height: 60px;

      img {
        @L: 40px;
        width: @L;
        height: @L;
        position: static;
        float: left;
      }

      .sub {
        float: left;
      }

      .lightLogo {
        position: absolute;
        left: 75px;
        top: 6px;
      }

      .plus {
        float: right;
      }
    }

    img.pannelBtn {
      width: 60px;
      border-radius: 50%;
      .pannelBtnFunc();
    }

    .mainPannel {
      right: 20px;
      bottom: 0;
    }
  }

  .btn {
    position: absolute;
    width: 100px;
    height: 100px;
    left: 190px;
    top: 262px;
    border-radius: 50%;
    z-index: 10000;
    opacity: 1;
    filter: blur(10px);
    background-color: yellow;
    transition: all 0.5s;

    animation-name: flash;
    animation-iteration-count: infinite;
    animation-duration: 1s;

  }

  main {
    width: @mainW;
    //width: 100%;
    margin: 0 auto;
    height: @mainH;
    //outline: solid 1px white;
    position: relative;
    overflow: hidden;


    .mask {
      position: absolute;
      width: 180px;
      height: 180px;
      border-radius: 50%;
      z-index: 1000;
      //border: 3px solid white;
      box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.92);
      filter: blur(50px);
      transition: all 0.8s;
    }

    .bg {
      transition: all 1s;
      animation-name: fadeIn;
      animation-duration: 1s;
      //outline: solid 2px;
    }

    .bg10 {
      left: @mainW*0.5;
      top: @mainH*0.5;
      margin-left: -@imgW*0.5;
      margin-top: -@imgH*0.5;
    }

    .maskBg {
      width: 100%;
      position: absolute;
      left: 0;
      top: 0;
      filter: blur(30px);
    }

    .light {
      transition: all 0.5s;
      animation-name: fadeIn;
      animation-duration: 1s;
      transform: scale(0.4);
    }

    img {
      position: absolute;
    }

  }
}
